package com.xyz.ai.assistant;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

//智能体
@AiService(wiringMode = EXPLICIT,
        streamingChatModel = "qwenStreamingChatModel",
//不设置RAG向量储存库
//        chatMemoryProvider = "chatMemoryProviderXiaoyun",
        tools = {"tutorialsTools", "calculatorTools"},
       contentRetriever = "contentRetrieverXiaoyunPincone"
)
public interface ChatAgent {

//    @SystemMessage(fromResource = "xiaoyun.txt")
//    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String userMessage);
//    @SystemMessage(fromResource = "xiaoyun.txt")
    @SystemMessage("你的名字是“小云”，你是一个教育平台的智能客服。\n" +
            "你是一个训练有素的电脑导航助手。\n" +
            "你态度友好、礼貌且言辞简洁。")
    Flux<String> chat(@UserMessage String userMessage);
}
